<template>
	<view class="item-box" @click="toDetail">
		<view class="u-flex u-m-b-16">
			<u-avatar :src="info.avatar" :size="90" show-level :level-bg-color="config.mainColor"></u-avatar>
			<view class="u-flex-1 u-m-l-14 w-0">
				<view class="u-flex u-m-b-10">
					<text class="u-font-36 u-m-r-14" style="font-weight: 600;">{{info.name}}</text>
					<bb-tag></bb-tag>
				</view>
				<view class="u-tips-color u-line-1" v-if="info.label">
					{{info.label}}
					<!-- <text class="divide ">|</text>
					<text class="">{{info.edu_name}}</text>
					<text class="divide ">|</text>
					<text class="">{{info.exp_name}}</text> -->
				</view>
			</view>
			<view class="u-light-color">
				评分<text class="u-type-primary">{{info.serve_score}}</text>
			</view>
		</view>
		<view class="u-m-b-16">
			<view class="service-item u-line-1" v-for="(ser,idx) in info.serve_list_three" :key="idx">
				{{ser.title}}
			</view>
		</view>

		<view class=" u-flex u-flex-wrap">
			<template v-for="(item,idx) in info.class_three_name.split(',')">
				<view class="u-m-r-20 u-m-b-24" v-if="idx<3" :key="idx">
					<u-tag :text="item" type="info" border-color="transparent" />
				</view>
			</template>

		</view>

		<view class="u-flex u-col-center">
			<view class="u-flex-1">
				<text class="u-type-primary">需要预约</text>
				<text class="divide u-light-color">|</text>
				<text :class="[info.free_status?'u-type-primary':'u-light-color']">随叫随到</text>
			</view>
			<view class="u-type-error font-medium u-m-r-16">￥<text class="u-font-26">{{info.serve_price}}</text>起</view>
			<text class="iconfont icon-dingwei u-font-12 u-m-r-10" style="color: #CCCCCC;"></text>
			<text class="u-light-color">{{info.distance}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "bb-member",
		props: {
			info: {
				type: Object,
				default: () => ({})
			},
			isWebview: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				config: this.$appConfig
			};
		},
		mounted() {
			// console.log(this.$appConfig)
		},
		methods: {
			toDetail() {
				this.$u.route('/pages/subpage/profile/index', {
					id: this.info.uid
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item-box {
		background-color: #fff;
		border-radius: 20rpx;
		padding: 30rpx;
		margin-bottom: 30rpx;
	}

	.divide {
		margin: 0 16rpx;
	}

	.service-item {
		font-size: 28rpx;
		margin-bottom: 16rpx;

		&:before {
			content: "";
			display: inline-block;
			width: 10rpx;
			height: 10rpx;
			border-radius: 50%;
			background-color: #999;
			margin-right: 16rpx;
			margin-bottom: 7rpx;
		}
	}
</style>